﻿Imports System.Windows.Forms.Design

<ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ContextMenuStrip)> _
Public Class MenuBanner
    Inherits ToolStripMenuItem

    Public Overrides Property Image() As System.Drawing.Image
        Get
            Return MyBase.Image
        End Get
        Set(ByVal value As System.Drawing.Image)
            MyBase.Image = value
            MyBase.Size = value.Size
        End Set
    End Property

    Public Sub New()
        MyBase.AutoSize = False
    End Sub

    Private Sub MenuBanner_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        Dim gfx As Graphics = e.Graphics

        If Not Me.DesignMode Then gfx.DrawImage(Me.Image, e.ClipRectangle)
    End Sub

End Class
